#ifndef ___PACKAGE_H___
#define ___PACKAGE_H___
#include "CRC.h"
#include "RAM.h"
#include "Command.h"

#define PACKAGE_SENDBUF_SIZE	SEND_BUF_MAX_SIZE			//封包的最大大小不能超过sendbuf
#define PACKAGE_RCVBUF_SIZE		RCV_BUF_MAX_SIZE			//解包的缓存buf为接收RAM的大小

//函数声明
//将要发送的数据打包
extern void PACKAGE_PackData(uint16_t* buf , uint16_t lenth);
//将接收到的数据包解开
extern int PACKAGE_UnpackData(uint16_t *cmd,uint16_t *parameter);

#endif

